package cn.wolfcode.luowowo.query;


import cn.wolfcode.luowowo.util.TravelCondition;
import lombok.Getter;
import lombok.Setter;

@Setter
@Getter
public class TravelQuery extends QueryObject {
    /*接收目的地的id*/
    private String destId;
    /*接收用户的id*/
    private String userId;
    
    //接收天数查询条件 默认为不限
    private Integer dayType = -1;
    //旅游花销查询条件
    private  Integer perExpendType = -1 ;
    
    //最新获取最热排序 默认是最新游记
    private Integer orderType = 1;
    
    //调用封装方法,将前端传的daytype传到方法中去
    public TravelCondition getDay() {
        /*将前台传的值调到TravelCondition方法中  用datype作为key查找到对应的天数value对象*/
        return TravelCondition.DAY_MAP.get(dayType);
    }
    //调用封装方法,将前端传的daytype传到方法中去
    public TravelCondition getExpend() {
        /*将前台传的值调到TravelCondition方法中  用datype作为key查找到对应的天数value对象*/
        return TravelCondition.EXPEND_MAP.get(perExpendType);
    }
}
